package com.javase.sy06p.Q1;

public class Hero {
    String name;
    Pet pet;

    public Hero(String name) {
        this.name = name;
    }

    public Hero(String name, Pet pet) {
        this.name = name;
        this.pet = pet;
    }

    public void run(){
        System.out.println("Hero开始跑了");
        pet.follow();
    }

}
